/*
███████╗██╗   ██╗ ██████╗██╗  ██╗
██╔════╝██║   ██║██╔════╝██║ ██╔╝
█████╗  ██║   ██║██║     █████╔╝ 
██╔══╝  ██║   ██║██║     ██╔═██╗ 
██║     ╚██████╔╝╚██████╗██║  ██╗
╚═╝      ╚═════╝  ╚═════╝╚═╝  ╚═╝
*/
package common.JavaBean;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 【最终修正】订单JavaBean，严格对应数据库 'orders' 表。
 */
public class Order {

    private int orderId;
    private int userId;
    private int productId;
    private int status; // 订单状态: 0-未支付, 1-已完成, 2-用户取消, 3-系统取消
    private int quantity;
    private BigDecimal snapshotPrice; // 下单时商品快照单价
    private BigDecimal totalPrice; // 订单总价
    private Date createdAt;
    private Date paidAt;

    // 无参构造
    public Order() {
    }

    // --- Standard Getters and Setters ---
    public int getOrderId() { return orderId; }
    public void setOrderId(int orderId) { this.orderId = orderId; }
    public int getUserId() { return userId; }
    public void setUserId(int userId) { this.userId = userId; }
    public int getProductId() { return productId; }
    public void setProductId(int productId) { this.productId = productId; }
    public int getStatus() { return status; }
    public void setStatus(int status) { this.status = status; }
    public int getQuantity() { return quantity; }
    public void setQuantity(int quantity) { this.quantity = quantity; }
    public BigDecimal getSnapshotPrice() { return snapshotPrice; }
    public void setSnapshotPrice(BigDecimal snapshotPrice) { this.snapshotPrice = snapshotPrice; }
    public BigDecimal getTotalPrice() { return totalPrice; }
    public void setTotalPrice(BigDecimal totalPrice) { this.totalPrice = totalPrice; }
    public Date getCreatedAt() { return createdAt; }
    public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }
    public Date getPaidAt() { return paidAt; }
    public void setPaidAt(Date paidAt) { this.paidAt = paidAt; }
}
